@echo off

set "PS_SCRIPT=%~dp0network_connections.ps1"

echo Network Connections Viewer

REM Check if PowerShell script exists
if exist "%PS_SCRIPT%" (
    echo Executing PowerShell script...
    powershell.exe -ExecutionPolicy Bypass -File "%PS_SCRIPT%"
) else (
    echo Warning: PowerShell script "%PS_SCRIPT%" does not exist
    echo Displaying basic network connection information using netstat...
    echo.
    netstat -ano | findstr ESTABLISHED
    echo.
    echo If you need more detailed information, please create the PowerShell script
)

pause